Optimize gtk_css_node_declaration_has_class
authorMatthias Clasen <mclasen@redhat.com>
Wed, 9 Sep 2015 18:40:36 +0000 (14:40 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 9 Sep 2015 18:40:36 +0000 (14:40 -0400)
commitcf0e087527f4fdc1c79649bc75361eb2e7e994f8
treee74e6a87827bc54b714029882bf9f3bd8dde81e4
parent59797754b47214a1268a20bdda99afbf5d3d93fb
Optimize gtk_css_node_declaration_has_class

This function is getting called a lot. Statistics for the gtk3-demo
listbox example show most calls with 0-4 classes. Unrolling the cases
a bit brings the instruction count in callgrind from 93M to 52M.
gtk/gtkcssnodedeclaration.c